#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
struct S
{
	char c;
	int a;
	double d;

};
#define OFFSETOF(s_name,m_name) (int)&(((s_name*)0)->m_name)
int main()
{
	struct S s = { 0 };
	printf("%d\n", OFFSETOF(struct S, c));
	printf("%d\n", OFFSETOF(struct S, a));
	printf("%d\n", OFFSETOF(struct S, d));

	return 0;
}